package com.dodoke.cake.service.impl;


import com.dodoke.cake.bean.User;
import com.dodoke.cake.dao.LoginDao;
import com.dodoke.cake.service.LoginService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {

	@Autowired
	private LoginDao loginDao;


	@Override
	public User login(String username) {
		User u = loginDao.selectUserByNameAndPassword(username);
		if(u != null) {
			return u;
		}
		return null;
	}
}
